package com.pktechan.api.service.impl;

import com.pktechan.api.base.BaseMapper;
import com.pktechan.api.base.BaseServiceImpl;
import com.pktechan.api.dao.CloudTicketMapper;
import com.pktechan.api.dao.CloudTicketMapper;
import com.pktechan.api.entity.CloudTicket;
import com.pktechan.api.service.CloudTicketService;
import com.pktechan.api.service.CloudTicketService;
import com.pktechan.api.vo.CloudTicketVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service("cloudTicketService")
@Transactional
public class CloudTicketServiceImpl extends BaseServiceImpl<CloudTicket> implements CloudTicketService {

    @Autowired
    private CloudTicketMapper cloudTicketMapper;

    /**
     * 由业务类实现
     *
     * @return
     */
    @Override
    public BaseMapper<CloudTicket> getBaseMapper() {
        return cloudTicketMapper;
    }

    /**
     * 根据客户ID获取积分持仓
     *
     * @param custId
     * @return
     */
    @Override
    public CloudTicket getByCustId(Integer custId) {
        return cloudTicketMapper.getByCustId(custId);
    }

    /**
     * 配送中心
     * @param custId
     * @return
     */
    @Override
    public CloudTicketVO getDistributionCenter(Integer custId) {
        return cloudTicketMapper.getDistributionCenter(custId);
    }


}
